<template>
    <el-dialog
    title="预览"
    :visible.sync="previewDialog"
    width="60%"
    :before-close="closeHandler">
        <div v-html="showData.content">
        </div>

    <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="closeHandler">确 定</el-button>
    </span>
    </el-dialog>
   
</template>

<script>
export default {
  props: {
    previewDialog: {
      type: Boolean,
      default: false
    },
    popData: {
      type: Object,
      default: null
    }
  },
  watch: {
   popData() {
      this.showdata = this.popData; 
    }
  },
  data() {
    return {
      showData:{content:"<p>显示</p>"}
    }
  },
  mounted() {

  },
  methods: {
    closeHandler: function () {
      this.$emit("close");
    },
    handleChange(value){//选择类型
      console.log(value);

    }
  }
};
</script>

<style lang="sass" scoped>
</style>
